#define _CRT_SECURE_NO_WARNINGS
#include "stdio.h"
#include <stdlib.h>
typedef struct calendar
{
	int year;
	int month;
	int day;
}Calendar;
int main()
{

	FILE* fp;
	Calendar c,* p;
	p = &c;
	if ((fp = fopen("date.txt", "w+") )== NULL)
	{
		printf("File open error!");
		exit(0);
	}
	scanf("%d/%d/%d", &p->month,&p->day, &p->year);
	fprintf(fp,"%d/%d/%d", p->month, p->day, p->year);
	fscanf(fp,"%d/%d/%d", &p->month, &p->day, &p->year);
	printf("%4d.%2d.%2d\n", p->year, p->month, p->day);
	if (fclose(fp))
	{
		printf("File close error!");
		exit(0);
	}
	return 0;
}
